<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <span>姓</span><input type="text" v-model="firstName">
        <span>名</span><input type="text" v-model="lastName">
        <span>姓名</span><input type="text" v-model="fullName">
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
    Vue.config.productionTip = false;

    new Vue({
        el:"#app",
        data:{
            firstName:"T",
            lastName:"Mac"
        },
        computed:{
            fullName(){
                return this.firstName + "-" + this.lastName
            }
        }
    })
</script>
</html>